package com.putao.album.fileupload;

import com.putao.album.ahibernate.annotation.Column;
import com.putao.album.ahibernate.annotation.Id;
import com.putao.album.ahibernate.annotation.Table;
import com.putao.album.base.BaseItem;

import java.io.Serializable;

/**
 * Created by jidongdong on 15/5/8.
 */
@Table(name = "PhotoUploadedInfo")
public class FileInfo extends BaseItem implements Serializable {

    @Id
    private Long _id;

    /**
     * 文件路径
     */
    @Column(name = "filePath")
    private String filePath;

    /**
     * 拍照时间,文件修改时间
     */

    @Column(name = "takeTime")
    private String takeTime;


    /**
     * 已上传文件的SHA1值
     */
    @Column(name = "hash")
    private String hash;

    /**
     * 已上传文件的头3000byte的SHA1值
     * 用于加快本地文件校验
     */
    @Column(name = "headHash")
    private String headHash;

    /**
     * 孩子的Id
     */
    @Column(name = "babyId")
    private String babyId;
    /**
     * 是否上传成功,1L上传成功,0L已经选择,没有上传
     */
    @Column(name = "status")
    private Long status = 0L;

    /**
     * 上传成功后,图片的Id
     */
    @Column(name = "photoId")
    private String photoId;

    public FileInfo() {

    }

    public FileInfo(String filePath, String hash, String taketime) {
        this.filePath = filePath;
        hash = hash;
        takeTime = taketime;
    }

    public String getFilePath() {
        return filePath;
    }

    public String getTakeTime() {
        return takeTime;
    }

    public void setTakeTime(String takeTime) {
        this.takeTime = takeTime;
    }

    public String getHash() {
        return hash;
    }

    public void setHash(String hash) {
        this.hash = hash;
    }

    public String getBabyId() {
        return babyId;
    }

    public void setBabyId(String babyId) {
        this.babyId = babyId;
    }

    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public String getHeadHash() {
        return headHash;
    }

    public void setHeadHash(String headHash) {
        this.headHash = headHash;
    }

    public String getPhotoId() {
        return photoId;
    }

    public void setPhotoId(String photoId) {
        this.photoId = photoId;
    }
}
